package com.xxxy.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.xxxy.blockhandler.HotspotBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HotspotController {
    @GetMapping("/hotspot")
    @SentinelResource(value = "getHotspotResource", blockHandler = "hotspotBlockHandler",
             blockHandlerClass = HotspotBlockHandler.class)
    public String getHotspot(@RequestParam(value = "type",required = false)String type,
                             @RequestParam(value = "size",required = false)String size){
        return "进入 热点";
    }
}
